const odooModelName = 'res.partner'

const values_default = { is_company: true, company_name: 'soil' }

const domain_default = {
  // is_company: true, company_name: 'soil'
  company_id: 1001,
  comment___like: 'customer'
}

const fields_default = {
  // user_id: null,
  // child_ids: { name: null, email: null }
}

const filterItems = ['name___like', 'country_id']

const columns = [
  'name',
  'country_id__name',
  'state_id__name'
  // 'product_pricelist_item_ids__names'
]

const formItems = [
  'name',
  'country_id',
  'state_id',
  'property_product_pricelist'
]

const Model = {
  name: odooModelName,
  configs: {
    values_default,
    domain_default,
    fields_default,
    filterItems,
    columns,
    formItems,
    handle: {
      view: { hidden: true }
    }
  },
  extend: BaseClass => {
    class ModelClass extends BaseClass {
      global_domain(domain_src = {}) {
        // console.log('this.global_domain in odoo.ResPartnerCompany')
        const domain = { ...domain_src }
        // const userinfo = self.get_userinfo()
        // const { uid } = userinfo
        // domain.user_id = uid
        return super.global_domain(domain)
      }
    }
    return ModelClass
  }
}

export default Model
